<template>
    <div class="container">
        <h1>欢迎来到 百杉 健身管理系统!</h1>
        <el-button type="success" @click="handleClick">点击</el-button>
        <div v-if="isDianji">
            <h2 style="margin-bottom: 2px;">这是一个非常牛逼的项目完成率近乎100%</h2>
            <video muted autoplay controls :src="url" style="width: 400px; height: 800px"></video>
        </div>

    </div>
</template>

<script setup lang="ts">
import { ref,onMounted } from 'vue';
import axios from 'axios';
import { on } from 'events';
const isDianji = ref(false);
const handleClick = () => {
    isDianji.value = !isDianji.value;
};
const url = ref('');
const getmp4 = () => {
    axios.get('https://api.kuleu.com/api/MP4_xiaojiejie').then((res) => {
        console.log(res);
        console.log(res.config.url);
        url.value = res.config.url;
    });
};
onMounted(() => {
    getmp4();
});
</script>

<style scoped lang="scss">
    .container{
        padding: 30px;
        button{
            margin: 20px 0;
        }
    }
</style>